package com.itheima.service;

import com.itheima.mapper.StaffMapper;
import com.itheima.pojo.Staff;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @author huangbin
 * @date 2022/6/6 16:13
 */
@Service
public class StaffService {
    @Autowired
    private StaffMapper staffMapper;

    /**
     * 添加员工
     *
     * @param staff
     * @return
     */
    public Integer add(Staff staff) {
        return staffMapper.add(staff);
    }

    public List<Staff> selectAll() {
        return staffMapper.selectAll();
    }

    public Staff selectById(int id) {
        return staffMapper.selectById(id);
    }

    public Integer del(int id) {
        return staffMapper.del(id);
    }

    public Integer update(Staff staff) {
        return staffMapper.update(staff);
    }




}
